package com.neusoft.chenhanhua.wh0913;

public class Calculator2 {
	private Integer x;
	private Integer y;
	private String marke;
	public String getX() {
		return x+ "";
	}
	public void setX(String x) {
		this.x = Integer.valueOf(x);
	}
	public String getY() {
		return y + "";
	}
	public void setY(String y) {
		this.y = Integer.valueOf(y);
	}
	public String getMarke() {
		return marke;
	}
	public void setMarke(String marke) {
		this.marke = marke;
	}
	@Override
	public String toString() {
		return "Calculator2 [x=" + x + ", y=" + y + ", marke=" + marke + "]";
	}
  public int reture() {
	   int result = 0;
	   switch (marke) {
	case "+":
		result= x+y;
		System.out.println(x+"+"+y+"="+result);
		break;
	case "-":
		result= x-y;
		System.out.println(x+"-"+y+"="+result);
		break;
	case "*":
		result= x*y;
		System.out.println(x+"*"+y+"="+result);
		break;
	case "/":
		result= x/y;
		System.out.println(x+"/"+y+"="+result);
		break;

	default:
		break;
	}
	   return result;
}

}
